<?php
include_once "xAP-functions/webincludes.php";


$item[]=array("title"=>"Latest","function"=>"NewsLoad","id"=>"0");

$results=dbquery("Select distinct Category from xAP_News_Source order by Category");
foreach($results as $r){
	$item[]=array("title"=>$r["Category"],"function"=>"Category","id"=>$r["Category"]);
}

$results=dbquery("Select SourceID,Alias from xAP_News_Source order by Alias");
foreach($results as $r){
	$item[]=array("title"=>$r["Alias"],"function"=>"NewsLoad","id"=>$r["SourceID"]);
}

echo "<UL class='sidebar'>";
	foreach($item as $key=>$v){
		echo "<LI><a href='#' OnClick=\"".$v["function"]."('".$v["id"]."');\">".$v["title"]."</a></LI>";
	}
echo "</UL>"
?>
